<h1>Listing users</h1>
<table>
    <thead>
        <tr>
            <th>
                Name
            </th>
        </tr>
    </thead>
    <tbody id='user_list'>
        <%= render :partial => 'user', :collection => @users %>
    </tbody>
</table>
<br/>
<!--
<%= link_to 'New user', new_user_path %>
-->
<p id="add_link">
    <%=
    link_to_function("New User",
    "Element.toggle('new_user')") %>
</p>
<div id="new_user" style="display:none;">
    <% form_remote_tag :url => {:action => 'new_user'},
    :html => {:id => 'new_user_form'} do%>
    <p>
        New User Name
    </p>
    <%= text_field 'user', 'name' %>
    <p>
        <%= submit_tag 'Add', :class => "submit" %>
    </p>
	<% end %>
</div>

<h1>Time Now:</h1>
<% periodically_call_remote :update => 'time_div',
:url => {:action => "time"},
:frequency => 6.0 %>

<div id='time_div'></div>
